import {whiteList} from "../index.ts";

/*@ts-ignore*/
export const routerBeforeEachConfig = (to: any, from: any, next: any) => {
    if (whiteList.includes(to.path)) {
        next();
    } else {
        const token = window.sessionStorage.getItem('token');
        token ? next() : next('/login');
    }
};
